Release 10.1A: OpenEdge Development:
Progress Dynamics Managers API Reference
checkIfOverlaps
This procedure checks if any record in a specified table exists that would overlap with a specified date range.
Location: af\app\afgenmngrp.i Parameters:INPUT pcTable AS CHARACTERName of table to do search on.
INPUT pcKeyField AS CHARACTERName of the keyfield to use in search. (Most probably foreign-key.)
INPUT pcFromField AS CHARACTERName of the 'from field', that is, from_date \ admission_date.
INPUT pcToField AS CHARACTERName of the 'to field', that is, to_date \ discharge_date.
INPUT pdCurrentRecordObj AS DECIMALObj value of current record, just to ensure that you do not compare values to the same record when modifying.
INPUT pdKeyValue AS DECIMALValue of the keyfield, generally the obj number.
INPUT ptFromValue AS DATEValue to compare from.
INPUT ptToValue AS DATEValue to compare to.
INPUT pcAdditionalWhere AS CHARACTERAdditional
Note: It creates a buffer forWHEREclause that can be added to the query if needed.pcTable. Thus if you passed ingsm_person, the created buffer will bebgsm_person. InpcAdditionalWhereremember to use the prefixed 'b' in your criteria specificationOUTPUT plOverlap AS LOGICALLogical value specifying if overlapping was found.
OUTPUT ptOverlapFrom AS DATENull(?) if no overlapping, otherwise from date of overlapping record.
OUTPUT ptOverlapTo AS DATENull(?) if no overlapping, otherwise to date of overlapping record.
Notes: None Examples: See the main block inaf\app\afgenchkifovrlpp.p.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |